@model Equinox.Application.ViewModels.CustomerViewModel

@{
    ViewData["Title"] = "Register new Customer";
}

<h2>@ViewData["Title"]</h2>

<form asp-action="Create">
    <div class="form-horizontal">
        <hr />

        @* Replacing classic Validation Summary to Custom ViewComponent as TagHelper *@
        <vc:summary />

        <div class="form-group">
            <label asp-for="Name" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <input asp-for="Name" class="form-control" />
                <span asp-validation-for="Name" class="text-danger"></span>
            </div>
        </div>

        <div class="form-group">
            <label asp-for="Email" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <input asp-for="Email" class="form-control" />
                <span asp-validation-for="Email" class="text-danger"></span>
            </div>
        </div>

        <div class="form-group">
            <label asp-for="BirthDate" class="col-md-2 control-label"></label>
            <div class="col-md-10">
                <input asp-for="BirthDate" class="form-control" />
                <span asp-validation-for="BirthDate" class="text-danger"></span>
            </div>
        </div>
       
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-success" />
                <a asp-action="Index" class="btn btn-info">Back to List</a>
            </div>
        </div>
    </div>
</form>


@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
